package com.example.mam.util;


import com.example.mam.dto.BaseResult;
import com.example.mam.exception.BizException;
import com.example.mam.exception.BizExceptionEnum;
import com.example.mam.exception.BizExceptionMessage;

public class ExceptionUtils {

    public static BaseResult<Object> returnBaseResult(BizException e, BizExceptionEnum bizExceptionEnum) {
            if (e.getBizExceptionEnum().getCode() == bizExceptionEnum.getCode()) {
                return new BaseResult<Object>(false, new BizExceptionMessage(bizExceptionEnum));
            }
            return null;
        }


    }
